import { RouteRecordRaw } from 'vue-router'
export const Layout = () => import('@/layout/index.vue')

const semRoutes: RouteRecordRaw[] = [
    {
        path: '/sem',
        component: Layout,
        redirect: '/sem/data-screening',
        name: 'SEM',
        meta: { title: 'SEM推广', icon: 'pie-chart-box-line' },
        children: [
            {
                path: 'data-screening',
                component: () => import('@/views/sem/DataScreening.vue'),
                name: 'DataScreening',
                meta: { title: '数据总览' },
                children: []
            },
            {
                path: 'project-management',
                name: 'ProjectManagement',
                meta: { title: '项目管理' },
                children: [
                    {
                        path: 'project-add',
                        component: () => import('@/views/sem/project/ProjectAdd.vue'),
                        name: 'ProjectAdd',
                        meta: { title: '添加项目' },
                        children: []
                    },
                    {
                        path: 'keyword-add',
                        component: () => import('@/views/sem/project/KeywordAdd.vue'),
                        name: 'KeywordAdd',
                        meta: { title: '添加关键词' },
                        children: []
                    }
                ]
            },
            {
                path: 'web-analytics',
                name: 'WebAnalytics',
                meta: { title: '网站分析' },
                children: [
                    {
                        path: 'overview',
                        component: () => import('@/views/sem/web/WebOverview.vue'),
                        name: 'WebOverview',
                        meta: { title: '网站概况' },
                        children: []
                    },
                    {
                        path: 'flow-analysis',
                        component: () => import('@/views/sem/web/FlowAnalysis.vue'),
                        name: 'FlowAnalysis',
                        meta: { title: '流量分析' },
                        children: []
                    },
                    {
                        path: 'source-analysis',
                        component: () => import('@/views/sem/web/SourceAnalysis.vue'),
                        name: 'SourceAnalysis',
                        meta: { title: '来源分析' },
                        children: []
                    },
                    {
                        path: 'interview-page',
                        component: () => import('@/views/sem/web/InterviewPage.vue'),
                        name: 'InterviewPage',
                        meta: { title: '受访页面' },
                        children: []
                    },
                    {
                        path: 'geographical-distribution',
                        component: () => import('@/views/sem/web/GeographicalDistribution.vue'),
                        name: 'GeographicalDistribution',
                        meta: { title: '地域分布' },
                        children: []
                    },
                ]
            },
            {
                path: 'keyword-ranking',
                component: () => import('@/views/sem/KeywordRanking.vue'),
                name: 'KeywordRanking',
                meta: { title: '关键词排名' },
                children: []
            }
        ]
    }
]

export default semRoutes;